package com.web_bloks.document.client;

/**
 * DocumentLoaderResponse
 * 
 * @author Jean-Lou Dupont
 *
 */
public class DocumentLoaderResponse {

	public final static int NA 		= -1;
	public final static int OK 		= 0;
	public final static int TIMEOUT = 1;
	public final static int PENDING = 2;
	public final static int ERROR 	= 3;

	public final static int HTTP_OK				= 200;
	public final static int HTTP_NOTFOUND		= 404;
	public final static int HTTP_SERVERERROR	= 500;
	
	int code = NA;
	int http = 0;
	
	public DocumentLoaderResponse() {
		this.code = NA;
	}
	
	public DocumentLoaderResponse(int code) {
		this.code = code;
	}
	
	public DocumentLoaderResponse(int code, int http) {
		this.code = code;
		this.http = http;
	}
	
	
	public boolean compareCode(int code) {
		return (this.code == code);
	}
	
	public int getHttpCode() {
		return http;
	}
	
}//END